#!/bin/bash

# 检查YUM配置中的gpgcheck
if grep -q "^gpgcheck=1" /etc/yum.conf 2>/dev/null; then
    echo "[+] YUM gpgcheck已启用"
    exit 1
else
    echo "[-] YUM gpgcheck未启用"
    exit 0
fi

# 检查DNF配置中的gpgcheck
if [ -f /etc/dnf/dnf.conf ]; then
    if grep -q "^gpgcheck=1" /etc/dnf/dnf.conf 2>/dev/null; then
        echo "[+] DNF gpgcheck已启用"
        exit 1
    else
        echo "[-] DNF gpgcheck未启用"
        exit 0
    fi
fi


